package com.vst.test.generate.structure.springmvc.plugin.util;
 
import java.io.File;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
 
public class JAXBExample {
	public static void main(String[] args) {
 
		EstructureObject customer = new EstructureObject();
		
	  customer.setPackageBase("com.test");
	  customer.setScriptsql("mysql");
 
	  try {
 
		File file = new File("C:/ProyectosLiferay/runtime-EclipseApplication/WSEstadio/src/main/resources/file.xml");
		JAXBContext jaxbContext = JAXBContext.newInstance(EstructureObject.class);
		Marshaller jaxbMarshaller = jaxbContext.createMarshaller();
 
		// output pretty printed
		jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
 
		jaxbMarshaller.marshal(customer, file);
		jaxbMarshaller.marshal(customer, System.out);
 
	      } catch (JAXBException e) {
		e.printStackTrace();
	      }
 
	}
}